package hotel.meituan.oversea.biz.service;

import hotel.base.oversea.dto.meituan.MtHotelGoodsDto;
import hotel.base.oversea.dto.switchs.SwitchCreateRoomDto;
import hotel.base.oversea.utils.Result;
import hotel.base.oversea.vo.meituan.request.goods.*;
import hotel.base.oversea.vo.meituan.request.room.MtHotelRealRoomVo;
import hotel.base.oversea.vo.meituan.response.goods.MtHotelGoodsPriceBaseDetailVo;
import hotel.meituan.oversea.api.vo.up.response.goods.MtHotelGoodsCallbackVo;
import hotel.meituan.oversea.api.vo.up.response.hotel.MtHotelDetailVo;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 *  美团酒店产品业务接口(在售产品房型信息)
 */
@Service
public interface MtHotelGoodsService {
    public Result<Object> apiGoodsRp(String source, List<Long> hotelIds, String checkinDate, String checkoutDate, int goodsType);
    public Integer getDaysCommonBaseSetForVip();
    public Result<Object> getTendHotelGoodsInfoForJob(List<Long> hotelList);
    public Result<Object> buildSwUpGoods(MtHotelDetailVo oneHotelDetail, List<MtHotelRealRoomVo> oneHotelRooms, MtHotelGoodsChildInfoVo oneHotelGoodsVos);

    //public String getRoomNameByGoodsIdHotelId(String hotelId,List<MtHotelGoodsBaseRoomVo> goodsBaseRoom,String goodsId);
    Result<Object> getCancelByGoodsInfo(String mtHotelId, String mtGoodsId, String checkinDate, String checkoutDate);
    //Integer getDaysCommonBaseSet();
    //String  returnRealRoomIdNotSaveLog(List<MtHotelDetailVo> voList, String thisMtHotelId, List<MtHotelGoodsBaseRoomVo> goodsBaseRoom);
    /**
     * 根据入住时间和离店时间 查询产品数据
     * @param  hotelIds 根据酒店ids获取数据并保存
     * @return vo
     */
    Result<Object> getMtHotelGoods(String source, List<Long> hotelIds, String checkinDate, String checkoutDate, int goodsType);
    /**
     * 产品库存信息-获取数据并保存
     * @param
     * @return vo
     */
    Result<Object> getMtHotelGoodsInventory(int goodsId, int roomId, String startDate, String endDate);
    /**
     * 酒店所有产品房态信息(根据酒店时间等查询)
     * 查询2020-05-20 到 2020-05-24
     * 返回多个产品每个产品三条数据，每个产品三条数据的依据是查询时间，2020-05-20 2020-05-21 2020-05-23
     * 包含起始时间，不包含结束时间
     * @param
     * @return vo
     */
    Result<Object> getMtHotelGoodsStatus(Long hotelId, String checkinDate, String checkoutDate, int goodstype, String source);

    public Result<Object> buildGoodsDataNotSave(List<Long> hotelIds, String source, MtHotelGoodsVo mtHotelGoodsVo);

    /**
     *  酒店产品价格日历
     * @param
     * @return vo
     */
    Result<Object> saveGetMtHotelGoodsPrice(List<Long> hotelId, List<Long> goodsId, String startDate, String endDate, String source);

    Result<Object> saveGetMtHotelGoodsPrice(Long goodsId, String startDate, String endDate);

    /**
     * 内部接口，产品各项信息规则总结返回
     * @param mtHotelGoodsSpecParamVo
     * @return
     */
    Result<Object> getMtGoodsByHotelId(MtHotelGoodsSpecParamVo mtHotelGoodsSpecParamVo);

    /**
     * 保存商品状态
     */
    void saveGoodsStatus(List<MtHotelGoodsStatusDetailVo> goodsList, String hotelId);

    /**
     * 保存产品规则信息变更通知
     * @param goods
     */
    Map<String,Object> saveCallbackGoodsRp(List<MtHotelGoodsCallbackVo> goods);

    /**
     * source = inner  内部接口
     * source = null 外部接口
     * @param source
     * @return
     */
    Result<Object> saveMtGoodsData(String source, MtHotelGoodsVo manyHotelGoodsData);

    SwitchCreateRoomDto requestSwitchsGoodsRoomInfoByRoomId(String goodsId);

    Result<Object> getMtHotelGoodsPriceNotSave(List<Long> hotelIdList, List<Long> goodsIdList, String startDate, String endDate);

    /**
     * 保存多组产品价格
     */
    void saveGoodsPriceInfosGroup(Map<String, List<MtHotelGoodsPriceBaseDetailVo>> priceListMap);
    /**
     * 保存一组产品价格
     */
    void saveGoodsPriceInfos(List<MtHotelGoodsPriceBaseDetailVo> priceList, String hotelId, String goodsId);

    Result<Object>  checkGoodsCancel(String mtHotelId, String mtGoodsId, String checkinDate);

    /**
     * 根据房型id 获取产品列表
     * @param roomId
     * @return
     */
    Result<List<MtHotelGoodsDto>> getMtGoodsByRoomId(String mtHotelId, String roomId);

    Result<Object> getMtInventoryByGoodsIdAndRoomId(Integer goodsId, Integer roomId);

    Result<Object> saveDealGoodsFromJob(List<MtHotelGoodsCallbackVo> goods);

    boolean requestGetSwitchsSaleRoomByMtGoodsInfo(Integer goodsId, String mtHotelId);

    Result pullTodayGoodsPriceAboutCompareHotel(Integer maxPrice);

    Result<Object> checkTenHotelsGoodsFailure(MtHotelGoodsCheckFailVo mtHotelGoodsCheckFailVo);

    Result getMtHotelGoodsFindActivity(Object o, List<Long> hotelIds, String checkinDate, String checkoutDate, Integer goodsType);

    void checkFindActivity(Object o, MtHotelGoodsVo data);

    Result<Object> checkFindNoActivity(Object o, MtHotelGoodsVo data, Map<String, String> map);

    void statMtGoodsPriceLibraryCallback(String source);
}
